<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">

    <h:outputStylesheet>
        a.no-decor>img {
        border: none;
        }
    </h:outputStylesheet>

    <ui:composition template="/WEB-INF/template/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.ListDrzavaTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">

            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>

            <a4j:status onstart="#{rich:component('statPane')}.show()" onstop="#{rich:component('statPane')}.hide()" />
            <h:form id="form">
                <rich:dataTable value="#{drzavaController.drzavas}" var="car" iterationStatusVar="it" id="table" rows="15">
                    <rich:column>
                        <f:facet name="header">#</f:facet>
                            #{it.index}
                    </rich:column>
                    <rich:column>
                        <f:facet name="header">Vendor</f:facet>
                        <h:outputText value="#{car.iddrzave}" />
                    </rich:column>
                    <rich:column>
                        <f:facet name="header">Model</f:facet>
                        <h:outputText value="#{car.naziv}" />
                    </rich:column>
                   
                    <f:facet name="footer">
                        <rich:dataScroller  page="#{drzavaController.pagination.page}" />
                    </f:facet>
                </rich:dataTable>
                <rich:popupPanel id="statPane" autosized="true">
                    <h:graphicImage value="/images/ai.gif" alt="ai" />
                    Please wait...
                </rich:popupPanel>
            </h:form>

        </ui:define>

    </ui:composition>

</html>
